<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['日志信息管理','警告日志']" icon="fa fa-tag" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span><h2>警告日志</h2></header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn">
								<div class="top_module top_module_box">
									<span class="top_module_label module_text">警告类型</span>
									<select name="" class="top_module_select" [(ngModel)]="type" (change)="table_search()">
										<option value="">全部</option>
										<option *ngFor="let item of typeList" [value]='item.value'>{{item.label}}</option>
									</select>
								</div>
							</div>
							<div class="right top-search" style="width: 240px;">
								<input type="text" [(ngModel)]="searchKey" (change)="table_search()" class="search-input" placeholder="设备ID、车牌号、操作内容...">
								<span class="top-search-box">
							        <button class="top-search-btn" type="button" (click)="table_search()"> <i class="fa fa-search"></i></button>
							    </span>
							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>设备ID</th>
										<th>车牌号</th>
										<th>类型</th>
										<th>操作内容</th>
										<th>持续时间[秒]</th>
										<th>产生时间</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData" >
										<td>{{row.deviceId}}</td>
										<td>{{row.carNumber}}</td>
										<td>
										 	<span  *ngIf="row.type === 0">设备</span>
								            <span  *ngIf="row.type === 1">传感器</span>
								            <span  *ngIf="row.type === 2">GPS定位</span>
								            <span  *ngIf="row.type !== 0 && row.type !== 1 && row.type !== 2">其他</span>
										</td>
										<td>
										  	<span  style="color: #d15b47;" *ngIf="row.content === '设备离线'">{{row.content}}</span>
		            						<span  style="color: #4cae4c;" *ngIf="row.content === '设备上线'">{{row.content}}</span>
										</td>
										<td>{{row.traceSecond}}</td>
										<td>{{row.createTime}}</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount"
						           [rows]="pageSize"
						           [currentPage]="curPage - 1"
						           (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>
</div>
